import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wwy
 * Date: 2024-11-27
 * Time: 20:28
 */
public class MyStack {
    public int[] elem;
    public int usedSize;

    public MyStack(int[] elem) {
        this.elem = new int[10];
    }
    public void push(int val){
        if (isFull()){
            this.elem= Arrays.copyOf(elem,2*elem.length);
        }
        elem[usedSize++]=val;
    }
    public boolean isFull(){
        return usedSize==elem.length;
    }
    public int pop(){
        usedSize--;
    }
    public int peek(){

    }
    public boolean isEmpty(){

    }
}
